package or.exa.cangguan.mapper;

import or.exa.cangguan.common.Page;
import or.exa.cangguan.entity.dto.ShelfDto;
import or.exa.cangguan.entity.dto.ShelfTypeDto;
import or.exa.cangguan.entity.po.Shelf;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShelfMapper {
    int deleteByPrimaryKey(Integer shelfId);

    int deleteByParentId(Integer shelfId);

    int insert(Shelf record);
    Integer selectIdByName(String shelfName);
    Integer selectShelvesCount(@Param("shelf") Shelf shelf);
    String selectNameById(Integer shelfId);

    List<ShelfTypeDto> selectShelfName();


    int insertSelective(Shelf record);

    List<ShelfDto> selectShelves(@Param("shelf") Shelf shelf, @Param("page") Page page);

    int updateByPrimaryKeySelective(Shelf record);

    int updateByPrimaryKey(Shelf record);
}